<template>
  <div class="pop">
    <!-- <van-cell
      is-link
      @click="showPopup"
    >展示弹出层</van-cell> -->
    <van-cell-group v-if="!show">
      <van-cell @click="hUserDislike">不感兴趣</van-cell>
      <van-cell
        is-link
        @click="show=true"
      >举报反馈</van-cell>
      <van-cell>拉黑作者</van-cell>
    </van-cell-group>
    <van-cell-group v-else>
      <van-cell
        icon="arrow-left"
        @click="show=false"
      >返回</van-cell>
      <van-cell
        v-for="report in reports"
        :key="report.value"
        @click="hSendReport(report.value)"
      >{{report.label}}</van-cell>
    </van-cell-group>
  </div>
  <!-- @click="$emit('user-report',report.value)" -->
</template>
<script>
import reports from '../../constant/report.js'
export default {
  data () {
    return {
      show: false,
      reports
    }
  },
  methods: {
    hUserDislike () {
      this.$emit('user-dislike')
    },
    hSendReport (value) {
      this.$emit('user-report', value)
    }
  }
}
</script>
<style lang="less" scoped>
.pop {
  border-radius: 20px;
}
</style>
